//
//  DRLoginDataModel.h
//  DoctorRen
//
//  Created by Lemon on 2018/11/20.
//

#import <Foundation/Foundation.h>
#import "DRUserModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface DRLoginDataModel : NSObject

+(DRUserModel *) getUserModel;

+(NSString *) getUserToken;

+(void) saveUserModel:(DRUserModel *) model;

+ (void)loginWithPhone:(NSString *)phone Password:(NSString *)password Success:(void(^)(DRUserModel *user))success Fail:(RequestFail)fail;

+ (void)registerWithPhone:(NSString *)phone Password:(NSString *)password MsgCode:(NSString *)code Success:(void(^)(void))success Fail:(RequestFail)fail;

+ (void)forgetPasswordWithPhone:(NSString *)phone Password:(NSString *)password MsgCode:(NSString *)code Success:(void(^)(void))success Fail:(RequestFail)fail;

+ (void) sendMsgCodeWithPhone:(NSString *) phone Success:(void(^)(void))success Fail:(RequestFail)fail;

+(void) thirdPartyLoginWithType:(NSInteger) type unionid:(NSString *)unionid Success:(void (^)(DRUserModel * user))success Fail:(RequestFail)fail;

+(void) bindPhoneWithPhone:(NSString *)phone Type:(NSInteger)type Uid:(NSString *)uid Password:(NSString *)password Code:(NSString *) code Success:(void (^)(DRUserModel * user))success Fail:(RequestFail)fail;

+(BOOL) isLogin;

+(void) setIsLogin:(BOOL)isLogin;

@end

NS_ASSUME_NONNULL_END
